﻿// //  ********************************************************************************
// //  Copyright (C) 2016 Sebastian Kenter. All rights reserved.
// // 
// //  Name    : PhotonServerProject | PhotonServerCommon | ServerPeerTMap.cs
// //  Created : 2016 - 03 - 21 13:40
// //  Modified: 2016 - 04 - 18 09:38
// //  ********************************************************************************

using FluentNHibernate.Mapping;
using PhotonServerCommon.Entities.Domain;

namespace PhotonServerCommon.Entities.Mapping
{
    public class ServerPeerTMap : ClassMap<ServerPeerT>
    {
        public ServerPeerTMap()
        {
            Schema("mseconfig");
            Table("serverpeer_t");
            Id(x => x.LocalPeerId).GeneratedBy.Assigned().Column("LocalPeerId");
            Map(x => x.Application).Column("Application").Not.Nullable();
            Map(x => x.ConnectionId).Column("ConnId").Not.Nullable();
            Map(x => x.LocalPort).Column("LocalPort").Not.Nullable();
            Map(x => x.Protocol).Column("Protocol").Not.Nullable();
            Map(x => x.RemotePort).Column("RemotePort").Not.Nullable();
            Map(x => x.LocalServerType).Column("LocalServerType").Not.Nullable();
            Map(x => x.LocalIp).Column("LocalIp").Not.Nullable();
            Map(x => x.RemoteIp).Column("RemoteIp").Not.Nullable();
            Map(x => x.RemotePeerId).Column("RemotePeerId");
            Map(x => x.DzIns).Column("DzIns").Not.Nullable();
            Map(x => x.DzUpd).Column("DzUpd").Not.Nullable();
            Map(x => x.NamUpd).Column("NamUpd").Not.Nullable();
            Map(x => x.Tsn).Column("Tsn").Not.Nullable();
            Map(x => x.LocalServerId).Column("LocalServerId").Not.Nullable();
            Map(x => x.RemoteServerId).Column("RemoteServerId");
            Map(x => x.RemoteServerType).Column("RemoteServerType");
            Map(x => x.Connected).Column("Connected").Not.Nullable();
        }
    }
}
